import { ref } from 'vue'

export function usePopupPreview() {
  const popoverVisible = ref<boolean>(false)
  const popoverImg = ref<string>()
  function mouseEnter(current: string) {
    popoverImg.value = current
    popoverVisible.value = true
  }
  function mouseLeave() {
    // popoverImg.value = ''
    popoverVisible.value = false
  }
  return {
    popoverImg,
    popoverVisible,
    mouseEnter,
    mouseLeave,
  }
}
